#ifndef _LINKER_H_
#define _LINKER_H_ 

#include "BlockingQueue.h"
#include "Buff.h"

class Linker {
private:
    int PreInitTail(){
        tailQue = std::make_shared<BlockingQueue<Buff>>();
        return 0 ;
    }
public:
    Linker(){
        PreInitTail();
    }
    ~Linker(){
        
    }
    std::shared_ptr<BlockingQueue<Buff>> headQue; //连接上一个队列 (需要用户自己初始化)
    std::shared_ptr<BlockingQueue<Buff>> tailQue; //连接下一个队列
    int Link(Linker &linker)
    {
        linker.headQue = tailQue;
        return 0;
    }
    int PreInitHead(){
        headQue = std::make_shared<BlockingQueue<Buff>>();
        return 0 ;
    }
};

#endif